import request from '@/utils/request'

/**
 * 登录
 */
export function login ({ username, password, code, uuid } = {}) {
  return request({
    url: '/login',
    method: 'post',
    data: { username, password, code, uuid }
  })
}

/**
 * 退出登录
 */
export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

/**
 * 获取用户详细信息
 */
export function getInfo () {
  return request({
    url: '/getInfo',
    method: 'get'
  })
}

/**
 * 获取路由信息
 */
export function getRouters () {
  return request({
    url: '/getRouters',
    method: 'get'
  })
}

/**
 * 获取验证码
 */
export function captchaImage() {
  return request({
    url: '/captchaImage',
    method: 'get'
  })
}
